package com.wang.users.util;

import java.util.Date;
import java.util.TimerTask;

import com.alibaba.fastjson.JSONObject;
import com.wang.common.util.ConstatFinalUtil;
import com.wang.common.util.DateUtil;
import com.wang.users.service.IUsersOperService;
import com.wang.users.service.impl.UsersOperServiceImpl;

/**
 * TimerTask:抽象类
 * 创建一个定时器任务
 * @author lby
 *
 */
public class MyTimerTask extends TimerTask
{
	private IUsersOperService usersOperService = new UsersOperServiceImpl();
	private DateUtil dateUtil = new DateUtil();
	@Override
	public void run()
	{
		ConstatFinalUtil.SYS_LOGGER.info("==method1==开始");
		Date now  = new Date();
		JSONObject resultJSON = this.usersOperService.saveOneStatResService(now);
		ConstatFinalUtil.SYS_LOGGER.info("==method1==结束:{}",resultJSON);
	}
	
}
